Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $("#btn1").click(function(){ $("#p1").fadeToggle(2500) }); $("#btn2").click(function(){ $("#p2").fadeToggle("slow","linear"); }); $("#btn3").click(function(){ $("#p3").fadeToggle("fast"); }); }); </script> </head> <body> <button id="btn1">fadeToggle() milliseconds</button> <button id="btn2">fadeToggle() slow</button> <button id="btn3">fadeToggle() fast</button> <p id="p1">This is a paragraph that takes 2500 milliseconds to fade out and in.</p> <p id="p2">This is a slow, linear paragraph.</p> <p id="p3">This is a fast paragraph.</p> </body> <!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_fadetoggle2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:15:16 GMT --> </html>
Result:
Try it Yourself - © w3schools.com